<template>
	<view>
		<block v-if="item.car">
			<view class="car" v-if="item.car.id">
				<image class="pic" :src="item.car.fm" mode="aspectFill"></image>
				<view class="pl-30">
					<view class="name">
						{{item.car.brand}}
					</view>
					<view class="desc">
						<view class="badge">
							{{item.car.seat_num}}座
						</view>
						<view class="badge">
							{{item.car.color}}
						</view>
						<view class="badge">
							{{item.car.number_plate}}
						</view>
						<view class="badge" v-if="item.city">
							{{item.city}}
						</view>
					</view>
				</view>
			</view>
		</block>
	</view>
</template>

<script>
	export default {
		name:"n-car",
		data() {
			return {
				
			};
		},
		props:{
			item:{
				type:Object,
				default:()=>{
					return {}
				}
			}
		}
	}
</script>

<style lang="scss">
.car{
	@include flex;
	background: #fff;
	padding: 30upx;
	.pic{
		width: 280upx;
		height: 180upx;
		border-radius: 10upx;
	}
	.name{
		color: #111;
		font-size: 34upx;
		font-weight: 600;
	}
	.desc{
		@include flex;
		flex-wrap: wrap;
		margin-top: 15upx;
		.badge{
			background: rgba(81, 157, 118,.2);
			color: #519D76;
			padding: 4upx 10upx;
			border-radius: 8upx;
			margin-right: 10upx;
			margin-bottom: 10upx;
			font-size: 26upx;
		}
	}
}
</style>